package com.lucy.rabc.params;

import com.lucy.common.validator.IsSex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "用户新增表单")
public class UserCreateParams {
    @NotNull(message = "部门ID不可为空")
    @ApiModelProperty("部门ID")
    private Long deptId;

    @NotNull(message = "岗位ID不可为空")
    @ApiModelProperty("岗位ID")
    private Long postId;

    @NotBlank(message = "用户账号不可为空")
    @ApiModelProperty("用户账号")
    private String userName;

    @NotBlank(message = "用户昵称不可为空")
    @ApiModelProperty("用户昵称")
    private String nickName;

    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$" , message = "电话号码有误")
    @ApiModelProperty("用户手机号")
    String phoneNumber;

    @IsSex
    @ApiModelProperty("用户性别")
    String sex;

    /** 用户邮箱 & 用户登录账号 **/
    @ApiModelProperty("用户邮箱")
    String email;

    @NotBlank(message = "用户登录密码不可为空")
    @ApiModelProperty("用户登录密码")
    String password;

}
